package com.autumn.mybatis.provider.builder;

import com.autumn.mybatis.metadata.EntityTable;
import com.autumn.mybatis.provider.IDbProvider;
import com.autumn.mybatis.provider.IDeleteBuilder;
import com.autumn.mybatis.provider.util.MybatisSqlUtils;

/**
 * 删除生成器
 * 
 * @author 杨昌国
 *
 *         2017-10-19 08:36:11
 */
public abstract class AbstractDeleteBuilder extends AbstractBuilder implements IDeleteBuilder {

	public AbstractDeleteBuilder(IDbProvider dbProvider) {
		super(dbProvider);
	}
	
	@Override
	public String getTruncateByTable(EntityTable table) {
		return MybatisSqlUtils.truncateByTable(table);
	}

	@Override
	public String getDeleteByAll(EntityTable table) {
		return MybatisSqlUtils.deleteByAll(table);
	}

	@Override
	public String getDeleteByPrimaryKeySql(EntityTable table) {
		return MybatisSqlUtils.deleteByPrimaryKey(table);
	}
}
